I am using jedit4.3pre15 with Sun JavaRE 1.6.0_07 on WinXP SP2.
Compared with jedit4.3pre14 I discovered the following regression:
The relative position of the cursor within an open buffer (sreen) is not restored
when exiting and restarting Jedit. Instead it seems that after a restart the last
position of the cursor is now shown in the first line of the screen. (if there are
enough lines after the last cursor position to move the document up)
Expected behaviour:
Wherever the cursor is and however I have scrolled the document - the screen-view
(last position of cursor and scroll-position) should be recovered after a restart
of Jedit. (as in jedit4.3pre14 and before)
To reproduce:
1) open a document with many lines.
2) scroll down (a bit) the document
3) place the cursor somewhere in the middle of the buffer view
4) remember how the screen looks like
5) exit and restart Jedit
6) discover that the cursor ("active line") is now at the top of the screen.
Actually when there are only view lines at the end of the document that are not shown,
then the cursor (active line) ends up somewhere between the last relative position
and the top of the screen (first line of the buffer-view). In this case the position
after restart is close to unpredictable, since it will neither be the first line on
screen nor will it be the last position on the screen.
I think the new behaviour is confusing, since it leads to unpredictable results for
the position of the active line, after a restart.
Moreover I think that orientation is easier when the old position is kept.
Sorry, I don't know the proper names of the different components. Hopefully this is
helpful anyway. Please don't hesitate to ask for more information.
Keep up the good work!
Submitted | goebbe - 2008-08-18 - 15:28:22z | Assigned | nobody |
---|---|---|---|
Priority | 5 | Category | None |
Status | Open | Group | None |
Resolution | None | Visibility | No |
2008-10-31 - 20:10:55z k_satoda |
I have also been confused many times on this new behavior. I seek in the source how the scroll position was restored at 4.3pre14, but nothing found. Then I re-examined the old and new behaviors. I realized that the old behavior was not restoring the scroll position, but centering the caret with restored caret position. But still couldn't find why the behavior was changed. |
---|---|
2008-12-09 - 10:26:04z goebbe |
I just tested if the bug is still present in Jedit 4.3pre16 and I confirm that that the bug is still present. The last scroll position is not restored after a restart. |
2009-07-07 - 12:46:06z goebbe |
I realise that "session" is still not restored correctly in 4.3pre17. Also when there are two buffers open with a vertical split view and the cursor is in the right buffer then after restarting Jedit the cursor is at the top of the left buffer. Ideally, exactly the same buffer (scroll) position and cursor (caret) position should be recreated after a restart of Jedit as it used to be before the restart. |
2009-12-03 - 18:12:36z shlomy |
Setting this to a feature request. It's not a bug in the sense that jEdit was never meant to restore the scroll position, only the caret position in the buffer. The scroll position is not saved at all. |
2009-12-03 - 18:20:05z ezust |
Currently, it should already restore the caret position, and the caret should be visible,
preferably centered, or perhaps at the top of the file if that's where the caret was
on exit. If the caret position is not correctly restored, that is still a bug. Please open it as a separate ticket. For example if you can make a test case that demonstrates this with split-views. But for the scrollbar positions to be restored, that requires change in the perspective.xml file format. |